import 'package:json_annotation/json_annotation.dart';

part 'store_revenue.g.dart';

@JsonSerializable()
class StoreRevenue extends Object {
  @JsonKey(name: 'decreaseTotalAmount')
  int decreaseTotalAmount;

  @JsonKey(name: 'decreaseTotalAmountPercent')
  String decreaseTotalAmountPercent;

  @JsonKey(name: 'totalAmount')
  int totalAmount;

  @JsonKey(name: 'tangFoodAmount')
  int tangFoodAmount;

  @JsonKey(name: 'tangFoodAmountPercent')
  String tangFoodAmountPercent;

  @JsonKey(name: 'totalOutFoodAmount')
  int totalOutFoodAmount;

  @JsonKey(name: 'totalOutFoodAmountPercent')
  String totalOutFoodAmountPercent;

  @JsonKey(name: 'totalAmountPercent')
  String totalAmountPercent;

  @JsonKey(name: 'orderNum')
  int orderNum;

  @JsonKey(name: 'tangFoodNum')
  int tangFoodNum;

  @JsonKey(name: 'tangFoodNumPercent')
  String tangFoodNumPercent;

  @JsonKey(name: 'totalOutFoodNum')
  int totalOutFoodNum;

  @JsonKey(name: 'totalOutFoodNumPercent')
  String totalOutFoodNumPercent;

  @JsonKey(name: 'orderNumPercent')
  String orderNumPercent;

  @JsonKey(name: 'foodPeopleNum')
  int foodPeopleNum;

  @JsonKey(name: 'tangFoodPeopleNum')
  int tangFoodPeopleNum;

  @JsonKey(name: 'foodPeopleNumPercent')
  String foodPeopleNumPercent;

  @JsonKey(name: 'selfFoodMoney')
  int selfFoodMoney;

  @JsonKey(name: 'takeOutFoodMoney')
  int takeOutFoodMoney;

  @JsonKey(name: 'foodMoney')
  int foodMoney;

  @JsonKey(name: 'selfNum')
  int selfNum;

  @JsonKey(name: 'takeOutFoodNum')
  int takeOutFoodNum;

  @JsonKey(name: 'foodNum')
  int foodNum;

  @JsonKey(name: 'cashierByMoney')
  int cashierByMoney;

  @JsonKey(name: 'waiterByMoney')
  int waiterByMoney;

  @JsonKey(name: 'qrCodeByMoney')
  int qrCodeByMoney;

  @JsonKey(name: 'selfByMoney')
  int selfByMoney;

  @JsonKey(name: 'cashierByNum')
  int cashierByNum;

  @JsonKey(name: 'waiterByNum')
  int waiterByNum;

  @JsonKey(name: 'qrCodeByNum')
  int qrCodeByNum;

  @JsonKey(name: 'selfByNum')
  int selfByNum;

  @JsonKey(name: 'payTypesList', defaultValue: [])
  List<PayTypesList> payTypesList;

  @JsonKey(name: 'totalDiscount')
  int totalDiscount;

  @JsonKey(name: 'totalDiscountPercent')
  String totalDiscountPercent;

  @JsonKey(name: 'storeDiscount')
  int storeDiscount;

  @JsonKey(name: 'storeDiscountPercent')
  String storeDiscountPercent;

  @JsonKey(name: 'memberDecreaseAmount')
  int memberDecreaseAmount;

  @JsonKey(name: 'memberDecreasePercent')
  String memberDecreasePercent;

  @JsonKey(name: 'freeAmount')
  int freeAmount;

  @JsonKey(name: 'freeAmountPercent')
  String freeAmountPercent;

  @JsonKey(name: 'sysDecreaseAmount')
  int sysDecreaseAmount;

  @JsonKey(name: 'sysDecreaseAmountPercent')
  String sysDecreaseAmountPercent;

  @JsonKey(name: 'decreaseAmount')
  int decreaseAmount;

  @JsonKey(name: 'decreaseAmountPercent')
  String decreaseAmountPercent;

  int totalPriceAmount;

  String totalPriceAmountPercent;

  int tangTotalPriceAmount;

  String tangTotalPriceAmountPercent;

  int outFoodTotalPriceAmount;

  String outFoodTotalPriceAmountPercent;

  int sendCouponCount;

  int usedCouponCount;

  int usedCouponCountStoreDineCount;

  int usedCouponCountTakeOutCount;

  String usedCouponCountStoreDinePercent;

  String usedCouponCountTakeOutPercent;

  int orderDiscount;

  String orderDiscountPercent;

  int commodityDiscount;

  String commodityDiscountPercent;

  int couponDiscount;

  String couponDiscountPercent;

  StoreRevenue(
    this.totalAmount,
    this.tangFoodAmount,
    this.tangFoodAmountPercent,
    this.totalOutFoodAmount,
    this.totalOutFoodAmountPercent,
    this.totalAmountPercent,
    this.orderNum,
    this.tangFoodNum,
    this.tangFoodNumPercent,
    this.totalOutFoodNum,
    this.totalOutFoodNumPercent,
    this.orderNumPercent,
    this.foodPeopleNum,
    this.tangFoodPeopleNum,
    this.foodPeopleNumPercent,
    this.selfFoodMoney,
    this.takeOutFoodMoney,
    this.foodMoney,
    this.selfNum,
    this.takeOutFoodNum,
    this.foodNum,
    this.cashierByMoney,
    this.waiterByMoney,
    this.qrCodeByMoney,
    this.selfByMoney,
    this.cashierByNum,
    this.waiterByNum,
    this.qrCodeByNum,
    this.selfByNum,
    this.payTypesList,
    this.totalDiscount,
    this.totalDiscountPercent,
    this.storeDiscount,
    this.storeDiscountPercent,
    this.memberDecreaseAmount,
    this.memberDecreasePercent,
    this.freeAmount,
    this.freeAmountPercent,
    this.sysDecreaseAmount,
    this.sysDecreaseAmountPercent,
    this.decreaseAmount,
    this.decreaseAmountPercent,
  );

  factory StoreRevenue.fromJson(Map<String, dynamic> srcJson) => _$StoreRevenueFromJson(srcJson);

  Map<String, dynamic> toJson() => _$StoreRevenueToJson(this);
}

@JsonSerializable()
class PayTypesList extends Object {
  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'unionOrderId')
  String unionOrderId;

  @JsonKey(name: 'payType')
  int payType;

  @JsonKey(name: 'totalFee')
  int totalFee;

  @JsonKey(name: 'payTypeName')
  String payTypeName;

  @JsonKey(name: 'payTime')
  String payTime;

  @JsonKey(name: 'recordId')
  int recordId;

  @JsonKey(name: 'chargeMoney')
  int chargeMoney;

  @JsonKey(name: 'actualMoney')
  int actualMoney;

  @JsonKey(name: 'payCount')
  int payCount;

  PayTypesList(
    this.id,
    this.unionOrderId,
    this.payType,
    this.totalFee,
    this.payTypeName,
    this.payTime,
    this.recordId,
    this.chargeMoney,
    this.actualMoney,
    this.payCount,
  );

  factory PayTypesList.fromJson(Map<String, dynamic> srcJson) => _$PayTypesListFromJson(srcJson);

  Map<String, dynamic> toJson() => _$PayTypesListToJson(this);
}
